#include <iostream>

using namespace std;

class p {
protected:
        int a;
        int b;
public:
        p() {cout << __func__ << "()" << endl;}
        p(int aa, int bb) {a = aa, b = bb;}
};

class c : public p {
protected:
        int cc;
public:
        c() {cout << __func__ << "()" << endl;}
        c(int aa, int bb, int c) : p(aa, bb) {cc = c;}
        friend ostream &operator<<(ostream &, const c &);
};

ostream &operator<<(ostream &os, const c &d)
{
        os << "(" << d.a << "," << d.b << "," << d.cc << ")";
        return os;
}

int main()
{
        c foo(11,22,33);

        cout << foo << endl;

        return 0;
}
